﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="TopicGroup.aspx.cs" Inherits="Topics_TopicGroup" %>
<%@ Register TagPrefix="uc" TagName="Menu" Src="~/Topics/Menu.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phActions" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phSubMenu" Runat="Server">
    <uc:Menu ID="menu" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="phMain" Runat="Server">
    <ajax:Accordion ID="accordian" DataSourceID="dsTopicGroup" SelectedIndex="-1" ToolTip="Click header to show and hide info" RequireOpenedPane="false" HeaderCssClass="header" ContentCssClass="content" CssClass="expandingDetails" runat="server">
        <HeaderTemplate><%#Eval("Name") %></HeaderTemplate>
        <ContentTemplate><%#Eval("Notes") %></ContentTemplate>
    </ajax:Accordion>
    <telerik:RadGrid ID="gridTopics" runat="server" AllowAutomaticDeletes="True" 
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
        AutoGenerateColumns="False" DataSourceID="dsTopics" GridLines="None" 
        onitemcommand="gridTopics_ItemCommand">
        <MasterTableView EditMode="InPlace" InsertItemDisplay="Bottom" DataSourceID="dsTopics" CommandItemDisplay="Bottom" 
            DataKeyNames="Id,ConcurencyId">
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" />
                <telerik:GridBoundColumn DataField="Created" HeaderText="Created" ReadOnly="true" />
                <acms:RadGridSequenceColumn HeaderText="Sequence" SortExpression="Sequence" SequenceField="Sequence" ShowSequence="false" />
                <telerik:GridHyperLinkColumn DataTextField="FileCount" DataNavigateUrlFormatString="TopicFiles.aspx?Id={0}&GroupId={1}" DataNavigateUrlFields="Id,TopicGroupId" HeaderText="Files" SortExpression="FileCount"/>
                <telerik:GridHyperLinkColumn Text="View Posts" DataNavigateUrlFormatString="TopicPosts.aspx?Id={0}&GroupId={1}" DataNavigateUrlFields="Id, TopicGroupId" HeaderText="Posts"/>
                <telerik:GridEditCommandColumn ButtonType="ImageButton"/>
                <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete" CommandName="Delete" ConfirmTitle="Confirm Delete" ConfirmText="Are you sure you want to delete this topic?" ConfirmDialogType="RadWindow"/>
            </Columns>

<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

<PopUpSettings ScrollBars="None"></PopUpSettings>
</EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>
    <acms:TopicGroupDataSource ID="dsTopicGroup" runat="server" 
        onselectdata="dsTopicGroup_SelectData" />
    <acms:TopicDataSource ID="dsTopics" runat="server" 
        onselectdata="dsTopics_SelectData" onupdatingdata="dsTopics_UpdatingData" 
        />
    <telerik:RadAjaxLoadingPanel ID="loading" InitialDelayTime="0" MinDisplayTime="2" Transparency="50" BackColor="DimGray" runat="server" Height="100%"
        Width="100%">
        <img alt="Loading..." src="../icons/loading1.gif" style="border: 0px;" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager DefaultLoadingPanelID="loading" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="gridTopics">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gridTopics" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>

